<template>
  <component :is="homeModule"></component>
</template>

<script>
// import HomeAuth from './dashboard/Home.auth'
// import HomeDemo from './dashboard/Home.demo'
import HomeUnAuth from './dashboard/Home.unauth'

export default {
  name: 'home',
  data () {
    return {
      homeModule: null
    }
  },
  created () {
    if (this.$store.state.app.isShowDashboard) {
      Promise.all([import(`@/views/dashboard/Home.unauth.vue`)])
        .then(([detailModal]) => {
          this.homeModule = detailModal.default
        })
    } else {
      this.homeModule = HomeUnAuth
    }
  }
}
</script>
